package jhavelogger.data;

import java.sql.SQLException;

import jhavelogger.models.DBLog;

/**
 * Interface for data access operations.
 * 
 * @author Jared Schlicht
 */
public interface LogDAO {

    /**
     * Inserts the specified database log object into the database
     * 
     * @param log log object to insert (must not be null)
     * @throws SQLException if a database error occurred
     */
    public abstract void insertLog(DBLog log) throws SQLException;

    /**
     * Saves the current changes to the database
     * @throws SQLException if a database error occurred
     */
    public abstract void commit() throws SQLException;

}